<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:r="http://ricchieri.com/facelets"
    xmlns:sec="http://www.springframework.org/security/tags"
    xmlns:p="http://primefaces.org/ui">

	<f:view contentType="text/html" locale="#{languageMB.language}" encoding="ISO-8859-1">
	    <h:head styleClass="header clearfix">
	      <title><ui:insert name="title"/></title>
		  <meta name="HandheldFriendly" content="True" />
		  <meta name="MobileOptimized" content="320" />
		  <meta content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" name="viewport" />
		  
		  <h:outputStylesheet library="css" name="style.css" />
		  <h:outputStylesheet library="css" name="raphaelicons.css" />
		  <h:outputStylesheet library="css" name="font-awesome.min.css" />
		  <h:outputStylesheet library="css" name="commonStyle.css" />
		  <h:outputStylesheet library="css" name="main.css" />
		  <h:outputScript library="js" name="libs/modernizr-2.5.2.min.js" />
		  <h:outputScript library="js" name="common.js" />
		    
		  <script type="text/javascript">
			BrowserDetect.init();
    	  </script>
		  
		  <ui:insert name="body"></ui:insert>
		  
  		  <h:form>
	        <div align="right" style="width: 100%">
	        	<a href="#{facesContext.externalContext.request.contextPath}/user/userLogged">
	        		<h:outputLabel escape="false" value="#{loggedUserMB.getUsername()}" />
	        	</a>
				<h:commandLink title="#{msg.logoutButton}" id="logout" action="#{viewLogoutMB.logout}" rendered="#{loggedUserMB.isAuthenticate()}">
					<i class="icon-off icon-2x color-logout"></i>
				</h:commandLink>
			</div>
		  </h:form>
	    </h:head>
	
	    <h:body styleClass="header clearfix" onload="init();">
			<div id="browser_disclaimer" class="errorMessage" style="display:none;padding-top:-15px">
				<h:outputLabel escape="false" value="#{msg.browser_disclaimer}" /><br/>
				<h:outputLabel escape="false" value="#{msg.browser_disclaimer_supported}" />
			</div>

			<div id="browser_disclaimer_warning" class="warnMessage" style="display:none;padding-top:-15px">
				<h:outputLabel escape="false" value="#{msg.browser_disclaimer}" /><br/>
				<h:outputLabel value="#{msg.browser_disclaimer_supported}" /><br/>
				<h:outputLabel value="#{msg.browser_disclaimer_warning}" />
			</div>
			
			
			<div class="clearfix">
				<div class="container">
					<a id="logo" href="#{facesContext.externalContext.request.contextPath}/home"><img style="width: 9.5em" src="#{facesContext.externalContext.request.contextPath}/images/ricchieri_logo_main.png"></img></a>
					<h:form>
						<ul class="social-icons">
							<li><p:clock pattern="dd/MM/yyyy HH:mm:ss"/></li>
							<li><a href="http://www.facebook.com/Ricchieritours" target="blank"><i class="icon-facebook-sign icon-2x icon-face"></i></a></li>
							<li><a href="https://twitter.com/ricchieritours" target="blank"><i class="icon-twitter-sign icon-2x icon-tw"></i></a></li>
							<li><a href="https://plus.google.com/117158460976368326019/posts" target="blank"><i class="icon-google-plus-sign icon-2x icon-g-plus"></i></a></li>
							<li><a href="http://www.ricchieritours.com.ar/" target="blank"><i class="icon-globe icon-face icon-2x" ></i></a></li>
							
							<sec:authorize access="isAuthenticated()">
								<li><p:commandLink action="#{languageMB.setLanguage('es')}" ajax="false"><img src="#{facesContext.externalContext.request.contextPath}/images/argentina.png"></img></p:commandLink></li>
								<li><p:commandLink action="#{languageMB.setLanguage('en')}" ajax="false"><img src="#{facesContext.externalContext.request.contextPath}/images/english.png"></img></p:commandLink></li>
							</sec:authorize>
						</ul>
					</h:form>
					<nav class="clearfix">
						<ul role="navigation">
							<sec:authorize access="isAuthenticated()">
								<li><a class="ui-widget-header" href="#{facesContext.externalContext.request.contextPath}/home"><span class="icon">S</span>#{msg.home}</a></li>
								<li><a class="ui-widget-header" href="#{facesContext.externalContext.request.contextPath}/reservation/homeReservation"><span class="icon">Û</span>#{msg.trips}</a></li>
								<li><a class="ui-widget-header" href="#{facesContext.externalContext.request.contextPath}/user/homeUser"><span class="icon">K</span>#{msg.users}</a></li>
							</sec:authorize>
							<sec:authorize access="hasRole('ROLE_ADMIN')">
								<li><a class="ui-widget-header" href="#{facesContext.externalContext.request.contextPath}/report/homeReport"><span class="icon">E</span>#{msg.reports}</a></li>
								<li><a class="ui-widget-header" href="#{facesContext.externalContext.request.contextPath}/admin/homeAdmin"><span class="icon">L</span>#{msg.others}</a></li>
							</sec:authorize>
							<li><a class="ui-widget-header" href="#{facesContext.externalContext.request.contextPath}/us/homeUs"><span class="icon">M</span>#{msg.us}</a></li>
						</ul>
					</nav>
				</div>
			</div>
			<section role="banner">
		    	<hgroup>
		       		<ui:insert name="header"></ui:insert>
		       	</hgroup>
		    </section> <!-- // banner ends -->

			<section class="container clearfix" style="min-height: 550px;"> 
				<aside role="complementary" style="height:550px">
		       		<ui:insert name="leftToolbar">
		       			Left Toolbar
		        	</ui:insert>
				</aside> 

				<article class="post content"> 
					<ui:insert name="content"></ui:insert> 
	            </article> 
	        </section>
			<footer role="contentinfo">
		      <p>
 		        <span class="left">#{msg.copyright}<a href="#">#{msg.gotos}</a></span>
 		        <sec:authorize access="isAuthenticated()">
			        <a href="#{facesContext.externalContext.request.contextPath}/home">#{msg.home}</a> | 
			        <a href="#{facesContext.externalContext.request.contextPath}/reservation/homeReservation">#{msg.trips}</a> | 
			        <a href="#{facesContext.externalContext.request.contextPath}/user/homeUser">#{msg.users}</a> |  
		        </sec:authorize>
		        <sec:authorize access="hasRole('ROLE_ADMIN')"> 
			        <a href="#{facesContext.externalContext.request.contextPath}/report/homeReport">#{msg.reports}</a> |
		        	<a href="#{facesContext.externalContext.request.contextPath}/admin/homeAdmin">#{msg.others}</a> | 
		        </sec:authorize>
		        <a href="#{facesContext.externalContext.request.contextPath}/us/homeUs">#{msg.us}</a>
		      </p>
		  </footer>
	    </h:body>
    </f:view>
</html>
